<template>
  <div>
    <yu-table ref="yuTable" :tableData="data.tableData" :columns="data.tableData.columns"> </yu-table>
  </div>
</template>

<script setup>
  import { ref, reactive, toRef, onBeforeMount, getCurrentInstance } from 'vue';
  let { proxy } = getCurrentInstance();
  const data = reactive({
    data: {},
    tableData: { data: [], columns: [], tableArrts: { haspage: true } },
  });
  onBeforeMount(() => {
    showData();
  });
  const showData = () => {
    proxy.$api.data.querySysTableShow(data.data).then(res => {
      data.tableData.columns = res.header;
      data.tableData.data = res.data;
    });
  };
  const props = defineProps({
    data: {},
  });
  data.data = toRef(props, 'data');
</script>
<style lang="scss" scoped></style>
